<html>


<head>
<script type="text/javascript">
var clickedIt = false;

function clearTextArea(id){ 
if (clickedIt == false){ 
id.value=""; 
clickedIt=true; 
} 
}

function colorBlack(){
	document.loginForm.loginname.style.color="black";
}


function Blank_TextField_Validator()
{
	

if (loginForm.loginname.value == "" || loginForm.loginname.value == "Please Enter User Name")
{
	document.loginForm.loginname.style.borderColor = "red"; 
alert("User Name is required.");

loginForm.loginname.focus();
document.loginForm.loginname.style.borderColor = ""; 
return (false);

}
if (loginForm.pwd.value == "") {
	document.loginForm.pwd.style.borderColor = "red"; 
	alert("Password is required.");
	document.loginForm.pwd.style.borderColor = "";
	return (false);
}

return (true);

}



</script>
</head>
<body>
	<%@ include file="header.jsp"%>
	<div align="center">
		<form name="loginForm" action="login" method="post" onsubmit="return Blank_TextField_Validator()" >
			<table>
				<tr>
					<td>User Name:</td>
					<td><input type="text" id="logName" name="loginname"
						style="color:grey"
						onclick="clearTextArea(this)"
						value="Please Enter User Name" onclick="colorBlack()"/></td>
				</tr>
				<tr>
					<td>Password:</td>
					<td><input type="password" id='pass' name="pwd" value="" /></td>
				</tr>
				<tr>
					<td colspan="2" align="center">
					<input type="submit"value="Login"> 
					<input type="button" value="Clear" onclick="this.form.reset()">

					</td>
				</tr>
				
				<tr>
					<td colspan="2" align="center">
					<a href="http://localhost/SamsonWebApp/jsp/register.jsp" target="_blank">Register Now</a>            
					<a href="http://localhost/SamsonWebApp/jsp/passwordRecover.jsp" target="_blank">Forgot Password?</a> 

					</td>
				</tr>

			</table>
			
		</form>
	</div>
	<%@ include file="footer.jsp"%>

</body>
</html>